package com.panshi.service;

import com.panshi.vo.DataResult;
import com.panshi.vo.SysFunction;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@Api(tags = "function-后台功能管理")
@FeignClient(value = "hasbei-sys-provider",contextId = "func")
public interface IFunctionApp {

    @ApiOperation("func-查询所有功能")
    @GetMapping("/func-app/list")
    public DataResult fidn();

    @ApiOperation("func-增加功能")
    @PostMapping("/func-app/add")
    public Boolean add(@RequestBody SysFunction function);

    @ApiOperation("func-删除功能")
    @GetMapping("/func-app/del/{id}")
    public Boolean del(@PathVariable Integer id);

    @ApiOperation("func-根据id查询功能")
    @GetMapping("/func-app/byid/{id}")
    public DataResult findFuncById(@PathVariable Integer id);

    @ApiOperation("func-修改功能")
    @PostMapping("/func-app/upd")
    public Boolean upd(@RequestBody SysFunction function);

}
